<extend name="layout/admin" />
<block name="title">商品添加</block>
<block name="content">
<script src="__PUBLIC__/Admin/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/Admin/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/Admin/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/Admin/ueditor/lang/zh-cn/zh-cn.js"></script>
	<div class="row">
		<div class="col-lg-12">
			<div class="panel panel-default">
				<div class="panel-heading">商品添加</div>
				<div class="panel-body">
					<div class="col-md-10 col-md-offset-2">
						<form role="form" action="__URL__/insert" enctype="multipart/form-data" method="post">
							<div class="form-group">
								<label>商品分类</label>
								<select class="form-control" name="pid">
									<foreach name="res" item="vo">
										<option value="{$vo.id}">&nbsp;{$vo.name}</option>
									</foreach>
								</select>
							</div>

							<div class="form-group">
								<label>商品名称</label>
								<input class="form-control" placeholder="请输入商品名称" type="text" name="gname">
							</div>

							<div class="form-group">
								<label>商品编号</label>
								<input class="form-control" placeholder="请输入商品编号" type="text" name="gid">
							</div>



							<div class="form-group">
								<label>商品规格</label>
								<input class="form-control" placeholder="请输入商品规格" type="text" name="size">
							</div>

							<div class="form-group">
								<label>通宝价</label>
								<input class="form-control" placeholder="请输入通宝价" type="text" name="pv">
							</div>

							<div class="form-group">
								<label>商品图片</label>
								<input type="file" name="pic">
							</div>

							<div class="form-group">
								<label>商品描述</label>
								<script id="editor1" name="desc" type="text/plain" style="width:700px;height:100px;"></script>
							</div>

							<div class="form-group">
								<label>商品特点</label>
								<script id="editor2" name="special" type="text/plain" style="width:700px;height:100px;"></script>
							</div>

							<div class="form-group">
								<label>注意事项</label>
								<script id="editor3" name="notice" type="text/plain" style="width:700px;height:100px;"></script>
							</div>
							
							<div class="form-group">
								<label>商品状态</label>
								<div class="radio">
									<label>
										<input name="status" id="optionsRadios1" value="1" checked type="radio">上架
									</label>
								</div>
								<div class="radio">
									<label>
										<input name="status" id="optionsRadios2" value="2" type="radio">下架
									</label>
								</div>
							</div>

							<div class="form-group">
								<label>库存</label>
								<input class="form-control" placeholder="请输入商品库存" type="number" name="repertory">
							</div>

							<div class="form-group">
								<label>销量</label>
								<input class="form-control" placeholder="请输入商品销量" type="number" name="sales">
							</div>

							<button type="submit" class="btn btn-primary">提交</button>
							<button type="reset" class="btn btn-default">取消</button>
						</form>
					</div>
				</div>
			</div>
		</div><!-- /.col-->
	</div>
	<script type="text/javascript">
		$(function(){
		     var ue1 = UE.getEditor('editor1');
		     var ue2 = UE.getEditor('editor2');
		     var ue3 = UE.getEditor('editor3');
		});
	</script>
</block>